import { Worker } from "../src/processPool";

export default class Test extends Worker {

  public async before() {
    console.log('before....');
  }

  public async run() {
    return new Promise((resolve) => {
      setTimeout(() => {
        resolve();
      }, 3000);
    });
  }

  public async after() {
    console.log('after....');
  }

  public receiveMessage(data) {
    console.log(process.pid, 'receivde', data);
  }
}